package com.example.vue20220402.controller;


import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.example.vue20220402.pojo.Patient;
import com.example.vue20220402.pojo.Usersinfo;
import com.example.vue20220402.service.IPatientService;
import com.example.vue20220402.vo.ResultData;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2022-04-14
 */
@RestController
@RequestMapping("/patient")
public class PatientController {

    @Resource
    IPatientService patientService;

    //  获取患者的个人信息
    @RequestMapping("/getPatient")
    public ResultData getPatient(Patient patient){
        System.out.println(patient);
        return patientService.getPatient(patient);
    }
    //  修改患者信息
    @RequestMapping("/editpat")
    public ResultData editpat(Patient patient){
        System.out.println(patient);
//        DateTime date = DateUtil.date();
//        System.out.println(date);
        return patientService.editpat(patient);
    }
}

